package com.lin.missyou.repository;

import com.lin.missyou.model.Banner;
import com.lin.missyou.model.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

/**
 * @author gcq
 * @Create 2021-10-31
 */
@Repository
public interface UserRepository extends JpaRepository<User, Long> {

    User findByEmail(String email);

    Optional<User> findByOpenid(String openid);

    User findFirstById(Long id);

    User findByUnifyUid(Long id);

    User getUserById(Long id);
}